<template>
  <h1>单选组件</h1>
  <el-radio-group v-model="edu">
    <el-radio label="学历:专科" value="zk"></el-radio>
    <el-radio label="学历:本科" value="bk"></el-radio>
    <el-radio label="学历:硕士" value="ss"></el-radio>
    <el-radio label="学历:博士" value="bs"></el-radio>
  </el-radio-group>
  <h4>你选择的结果是：{{edu}}</h4>

  <el-radio-group v-model="res">
    <el-radio v-for="item in arr" :label="item.level" :value="item.value"></el-radio>
  </el-radio-group>
  <h4>您的选择是：{{res}}</h4>
</template>

<script setup>
import {ref} from "vue";

const edu=ref('bk');
const res=ref('30');
const arr=ref([
      {level:'员工',value:'10'},
      {level:'经理',value:'20'},
      {level:'总监',value:'30'},
      {level:'总裁',value:'40'}
]);

</script>

<style scoped>

</style>